<?php
use yii\helpers\Url;
use yii\web\View;
use app\assets\SolutionAsset;
/* @var $this yii\web\View */
SolutionAsset::register($this); 
$this->title = $this->context->pageTitle.Yii::$app->params['titleSuffix'];
$this->params['breadcrumbs'] = [
  \Yii::t('common', 'Assets'),
  \Yii::t('common', 'Solution Audit')
];
$jsMsgs = $this->context->loadJsMsgs([
  'table',
  'dialog',
  'auditList',
]);
$this->registerJs("VAM.setVar('LANGUAGE_JS', '".$jsMsgs."');", View::POS_HEAD);
?>
<div class="page-header">
  <h1>
    <?=\Yii::t('common', 'Solution Audit')?>
    <small><?=\Yii::t('solution', 'Audit List')?></small>
  </h1>
</div>
<div class="panel panel-default">
  <div class="panel-heading"> 
    <i class="fa fa-table"></i>
    <?=\Yii::t('solution', 'Audit List')?>
    <ul class="list-inline list-unstyled pull-right">
      <li>
        <a class="data-table-refresh" href="#" title="<?=\Yii::t('common', 'Click to refresh data')?>">
          <i class="fa fa-refresh"></i>
        </a>
      </li>
      <li>
        <a href="#">
          <i class="fa fa-chevron-up"></i>
        </a>
      </li>
    </ul>
  </div>
  <div class="panel-body pos-r">
    <div id="list-loading-wrap" class="local-loading-wrap"></div>
    <div class="table-responsive">
      <table class="table table-hover table-striped table-bordered table-condensed" id="data-table" data-tag="vm-adserver.solution-audit-list">
        <thead class="heading">
          <tr>
            <th class="" data-resizable-column-id="id" data-search="on" data-filter="on"><!-- <label><input type="checkbox" class="ckb-all" /></label> -->ID</th>
            <th data-resizable-column-id="name" data-search="on" data-filter="on"><?=\Yii::t('solution', 'Solution Name')?></th>
            <th data-resizable-column-id="launch" data-search="on" data-filter="on"><?=\Yii::t('solution', 'Campaign')?></th>
            <th data-resizable-column-id="status" data-search="on" data-filter="on"><?=\Yii::t('solution', 'Status')?></th>
            <th data-resizable-column-id="editStatus" data-search="on" data-filter="on"><?=\Yii::t('solution', 'Edit Status')?></th>
            <th data-resizable-column-id="totalBudget" data-search="on" data-filter="on"><?=\Yii::t('solution', 'Current Budget')?></th>
            <th data-resizable-column-id="oldBudget" data-search="on" data-filter="on"><?=\Yii::t('solution', 'History Budget')?></th>
            <th data-resizable-column-id="launchTime" data-search="on" data-filter="on"><?=\Yii::t('solution', 'Solution Time')?></th>
            <th data-resizable-column-id="modifiedDate" data-search="on" data-filter="on"><?=\Yii::t('solution', 'Update Time')?></th>
            <th class="tab-op" data-resizable-column-id="operate" data-filter="on"><?=\Yii::t('solution', 'Actions')?></th>
          </tr>
        </thead>
        <tbody>
          <tr role="row">
            <td class="text-center dataTables_empty" colspan="10"><?=\Yii::t('site', 'No Records')?></td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>
<?php
  $dataList = Url::to(['get-solution-audit-list']);
  $creativeLinkUrl = Url::to(['creative/creative-list']);
  $listAuditOpUrl = Url::to(['audit-solution']);
  $this->registerJs("VAM.setVar('STRATEGY_DATA_LIST','$dataList');", View::POS_HEAD);
  $this->registerJs("VAM.setVar('LINK_URL','$creativeLinkUrl');",View::POS_HEAD);
  $this->registerJs("VAM.setVar('LIST_AUDIT_OP_URL', '$listAuditOpUrl')", View::POS_HEAD);
?>
<script type="text/javascript" >
  requirejs(["<?= Yii::getAlias('@web/').Yii::$app->params['envDir'];?>/js/site.js"], function(common) {
    requirejs(["<?= Yii::getAlias('@web/').Yii::$app->params['envDir'];?>/js/solutionAudit/solutionList.js"]);
  });
</script>
